package ru.inse.job.web.page;

import ru.inse.web.layout.InseLayoutFactory;
import ru.xeden.web.html.module.IModule;
import ru.xeden.web.html.page.IPage;
import ru.xeden.web.html.page.IPageFactory;
import ru.xeden.web.html.page.PageImpl;


public class JobPageFactory
    implements IPageFactory
{
    private PageImpl indexPage;

    @Override
    public IPage createPage(String pageName, IModule module)
    {
        if (indexPage == null)
        {
            indexPage = new PageImpl();
            indexPage.setRootNode(module.createLayout(InseLayoutFactory.INDEX_LAYOUT_ID, module));
        }
        return indexPage;
    }
}
